package com.party.core.dao.read.partner;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.partner.PartnerLabel;
import com.party.core.model.partner.PartnerMemberLabel;
import com.party.core.model.partner.PartnerRealUserOutput;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @program: party-temp
 * @description: 标签数据读取
 * @author: Huaqunhao
 * @create: 2018-08-21 17:48
 **/
@Repository
public interface PartnerLabelReadDao extends BaseReadDao<PartnerLabel> {
    List<PartnerLabel> getLabels(@Param("organizationId") String organizationId,@Param("orgIds")List<String> orgIds,@Param("type") Integer isMember);

    List<Map<String, String>> getLabelMembers(@Param("organizationId") String organizationId, @Param("labelId") String labelId);

    int getRealUserCount(@Param("organizationId") String organizationId, @Param("orgIds") List<String> orgIds,
                            @Param("partnerType") Integer partnerType);

    int getMemberUserCount(@Param("organizationId") String organizationId, @Param("orgIds") List<String> orgIds,
                           @Param("partnerType") Integer partnerType);

    List<PartnerRealUserOutput> getRealMemberPagelist(@Param("organizationId") String organizationId,
                                                      @Param("orgIds") List<String> orgIds,
                                                      @Param("partnerType") Integer partnerType,
                                                      Page page);

    List<PartnerRealUserOutput> getRealTotalPagelist(@Param("organizationId") String organizationId,
                                                     @Param("labId") String labId,
                                                     @Param("keyword") String keyword,
                                                     @Param("orgIds") List<String> orgIds,
                                                     @Param("partnerType") Integer partnerType,
                                                     Page page);

    List<PartnerRealUserOutput> getRealUserPagelist(@Param("organizationId") String organizationId,
                                                    @Param("keyword") String keyword,
                                                    @Param("orgIds") List<String> orgIds,
                                                    Page page);

    List<PartnerLabel> findByPartnerLabel(PartnerLabel partnerLabel);
}
